package com.example.abstractfactory4;


import com.example.abstractfactory4.factory4.*;

/**
 * @version 1.0.0
 * @className: rr
 * @description:
 * @author: zhangjunfa
 * @date: 2022/6/10 14:05
 */
public class Test {
    public static void main(String[] args) {
        //使用抽象层定义
        ColourFactory factory;
        Digit dt;
        Letter lt;
        Mark mk;
        //factory=(SkinFactory)XMLUtil.getBean();//为了开闭原则，可以利用反射机制和xml资源获取得到想使用的界面类
        factory = new BlackColourFactory();//想更换颜色可以在这里做修改
        dt = factory.createDigit();
        lt = factory.createLetter();
        mk = factory.createMark();
        dt.display();
        lt.display();
        mk.display();
    }
}
